// A-S-M team
// Project: BattleCity

#pragma once
#include "gobject.h"

class MovingObject : public GObject
{
public:
	MovingObject(CL_String sprite_name, float x, float y, ObjectType type, float maxspeed);

	void startMove();
	void startMove(Direction direction);
	void stopMove();
	void setDirection(Direction direction);
	Direction getDirection(){ return _direction; }
	bool isMoving(){ return _moving; }
	void moveTo(float x, float y);
	void moveByOffset(float dx, float dy);

	void update(int dt);
protected:

private:
	Direction _direction;
	float _maxspeed;
	bool _moving;
};